package com.design03_behavioral.pattern23_mediator.example02;

/**
 * @ClassName 具体同事类-承租人
 * @Description TODO
 * @Author 22963
 * @DATE 2023/9/11 1:23
 */
public class Tenant  extends Person {

    public Tenant(String name, Mediator mediator) {
        super(name, mediator);
    }

    //与中介者联系
    public void contact(String message){
        mediator.contact(message,this);
    }


    //获取信息
    public void getMessage(String message){
        System.out.println("租房者" + name + "获取到的信息: " +
                message);
    }
}
